package com.siwei.mes.controller.experiment;

import com.siwei.mes.common.result.Json;
import com.siwei.mes.service.ExperimentImageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 试验台账图片相关
 *
 * @author linzi
 * @since 2024-01-01 16:37:34
 */
@Api(value = "试验台账图片")
@RestController
@RequestMapping("experimentImage")
public class ExperimentImageController {
    @Resource
    private ExperimentImageService experimentImageService;

    @ApiOperation(value = "根据试验台账id获取所有图片信息")
    @GetMapping("selectByExperimentId")
    public Json selectByExperimentId(@RequestParam("experimentId") Long experimentId) {
        return Json.succ().data(experimentImageService.selectByExperimentId(experimentId));
    }

}
